package mul.Logic;

public class Crate{// implements OnTouchListener{
	
	public static final int NORMAL_CRATE = 0;
	public static final int GOLD_CRATE = 1;
	public static final int BLACK_CRATE = 2;
	public static final int FROST_CRATE = 3;
	public static final int FIRE_CRATE = 4;
	
	//	private Bitmap bitmap;
	private int number;
	private float xPos;
	private float yPos;
	private boolean isMoving;
	private boolean isClicked;
	private boolean isMarked;
	public boolean isDeleted;
	private int actualCol;
	private int crateType = NORMAL_CRATE;

	public Crate(int number, float xPos, float yPos, int actualCol){//, boolean isMoving){
		this.number = number;
		this.yPos = yPos;
		this.xPos = xPos;
		isMoving = true;
		isClicked = false;
		this.actualCol = actualCol;
	}

	public int getNumber(){
		return number;
	}
	
	public void setCrateType(int type) {
		crateType = type;
	}
	
	public boolean isNormalCrate() {
		return crateType == NORMAL_CRATE;
	}
	
	public boolean isGoldCrate() {
		 return crateType == GOLD_CRATE;
	}
	
	public boolean isBlackCrate() {
		return crateType == BLACK_CRATE;
	}
	
	public boolean isFrostCrate() {
		return crateType == FROST_CRATE;
	}
	
	public boolean isFireCrate() {
		return crateType == FIRE_CRATE;
	}
	
	public void setClicked(boolean value) {
		isClicked = value;
	}
	
	public void setMoving(boolean value) {
		isMoving = value;
	}
	
	public boolean isClicked() {
		return isClicked;
	}
	
	public boolean isMoving() {
		return isMoving;
	}
	
	public void incrXpos(float x){
		xPos += x;
	}
	
	public void incrYpos(float y){
		yPos += y;
	}
	
	public float getXpos(){
		return xPos;
	}
	
	public float getYpos(){
		return yPos;
	}
	
	public void setMarked(boolean m){
		isMarked = m;
	}
	
	public boolean isMarked(){
		return isMarked;
	}
	
	public int getActualCol(){
		return actualCol;
	}
}
